package com.suzhe.ymall.promotion.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 优惠券表
 * </p>
 *
 * @author suzhe
 * @since 2019-08-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_coupon")
@ApiModel(value = "Coupon对象", description = "优惠券表")
public class Coupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    @JsonSerialize(using=ToStringSerializer.class)
    @ApiModelProperty(value = "优惠卷id")
    private String id;

    @ApiModelProperty(value = "优惠券名称")
    private String name;

    @ApiModelProperty(value = "优惠券类型")
    private String couponType;

    @ApiModelProperty(value = "库存数量")
    private Integer stock;

    @ApiModelProperty(value = "满额限制:为0不限制")
    private Long fullAmount;

    @ApiModelProperty(value = "优惠券面值")
    private Integer couponValue;

    @ApiModelProperty(value = "折扣上限")
    private Integer discountLimit;

    @ApiModelProperty(value = "有效期模式")
    private String expireMode;

    @ApiModelProperty(value = "有效天数")
    private Integer expireDay;

    @ApiModelProperty(value = "过期时间")
    private Date expireTime;

    @ApiModelProperty(value = "过期提醒")
    private String expireRemind;

    @ApiModelProperty(value = "每人限领")
    private Integer userLimit;

    @ApiModelProperty(value = "预警数量")
    private Integer warnAmount;

    @ApiModelProperty(value = "预警邮箱")
    private String warnMail;

    @ApiModelProperty(value = "条件说明")
    private String description;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;


}
